<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%@taglib prefix="sj" uri="/struts-jquery-tags"%>
<%@taglib prefix="sjg" uri="/struts-jquery-grid-tags"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
<script type="text/javascript">
function formatLink(cellvalue, options, rowObject) {
	return "<a href='#'>Remove</a>";
}
</script>
</head>
<body>
	<s:url id="getOrganisationUrl" action="getOrganisationAction"/>
	
	<s:form theme="simple" action="associatePremise">	
			<s:url id="getPremiseUrl" action="getPremiseAction" />
			<sjg:grid id="gridtablePremise" caption="Premises" dataType="json"
				href="%{getPremiseUrl}" pager="true" gridModel="gridModel"
				rowNum="15" rownumbers="true">
				<sjg:gridColumn name="premiseName" index="premiseName" title="Premise Name" sortable="false" />
				<sjg:gridColumn name="address" index="address" title="Address" sortable="false" />
				<sjg:gridColumn name="phoneNumber" index="phoneNumber" title="Phone Number" sortable="false" />
				<sjg:gridColumn name="projectCode" index="projectCode" title="Project Code" sortable="false" />
				<sjg:gridColumn name="remove" index="remove"  title="Remove" sortable="false" 
					formatter="formatLink"/>
			</sjg:grid>
			<s:submit value="Associate new premise"></s:submit>
		</s:form>
</body>
</html>